package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author SL
 * @Version 1.0
 * @Date 2025/1/7
 * @Description TODO
 */
@Mapper
public interface SetmealDishMapper {
    /**
     * 根据菜品id查询对应的套餐id
     *
     * @param dishIds
     * @return
     */
    //select setmeal_id from setmeal_dish where dish_id in (1,2,3,4)
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    /**
     * 批量添加套餐菜品
     * @param setmealDishes
     */
    void saveSetmealDishes(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐id查询对应菜品
     * @param id
     * @return
     */
    List<SetmealDish> getBysetemalId(Long id);

    /**
     * 根据套餐id，删除对应的菜品
     * @param id
     */
    void deleteBySetealId(Long id);

}
